// show a successbox, if the user rights was saved successfully
if ( $request->getCheck( 'success' ) && $this->mFetchedUser !== null ) {
- $out->wrapWikiMsg(
- "<div class=\"successbox\">\n$1\n</div>",
- [ 'savedrights', $this->mFetchedUser->getName() ]
+ $out->addModules( [ 'mediawiki.special.userrights' ] );
+ $out->addModuleStyles( 'mediawiki.notification.convertmessagebox.styles' );
+ $out->addHtml(
+ Html::rawElement(
+ 'div',
+ [
+ 'class' => 'mw-notify-success successbox',
+ 'id' => 'mw-preferences-success',
+ 'data-mw-autohide' => 'false',
+ ],
+ Html::element(
+ 'p',
+ [],
+ $this->msg( 'savedrights', $this->mFetchedUser->getName() )->text()
+ )
+ )
);
}